//
//  FKGoodsSpecificationValue.m
//  WanTao
//
//  Created by Macbook Pro on 2019/3/27.
//  Copyright © 2019 Macbook Pro. All rights reserved.
//

#import "FKGoodsSpecificationValue.h"
static CGFloat const margin = 15;

@implementation FKGoodsSpecificationValue

- (void)setTitle:(NSString *)title
{
    _title = title;
    
    CGFloat itemH = fk_adjustW(32);
    CGSize textSize = [title boundingRectWithSize:CGSizeMake(fkScreenW - 30, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : fk_adjustFont(14)} context:nil].size;
    _itemSize = CGSizeMake(textSize.width + margin * 2, textSize.height > itemH ? textSize.height : itemH);
}

@end
